package com.com.designpatterns.composite;

import java.util.Enumeration;
import java.util.NoSuchElementException;

/**
 * Created by User on 17/09/2014.
 */
public abstract class AbstractEmployee {
    protected String name;
    protected float salary;
    protected Employee parent = null;
    protected boolean leaf = true;

    public abstract float getSalary();
    public abstract String getName();
    public abstract boolean addEmployee(Employee e)
            throws NoSuchElementException;
    public abstract boolean remove(Employee e)
            throws NoSuchElementException;
    public abstract Enumeration subordinates();
    public abstract Employee getChild(String s);
    public abstract double getSalaries();

    public boolean isLeaf(){
        return leaf;
    }
}
